<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
</head>
<body>
<script src="parsing-test-utils.js"></script>
<script>
description('Test parsing of the CSS shape-margin property.');

// The test functions and globals used here are defined parsing-test-utils.js.

validShapeLengths.forEach(function(value, i, a) {
    testShapeSpecifiedProperty("shape-margin", value, value);
});

testShapeSpecifiedProperty("shape-margin", "0", "0px");

invalidShapeLengths.forEach(function(value, i, a) {
    testShapeSpecifiedProperty("shape-margin", value, "");
});

applyToEachArglist(
    testShapeComputedProperty,
    [// [property, value, expectedValue]
     ["shape-margin", "0", "0px"],
     ["shape-margin", "1px", "1px"],
     ["shape-margin", "-5em", "0px"],
     ["shape-margin", "identifier", "0px"],
     ["shape-margin", "\'string\'", "0px"],
     ["shape-margin", "calc(25%*3 - 10in)", "calc(75% - 960px)"]]
);

applyToEachArglist(
    testNotInheritedShapeChildProperty,
    [// [property, parentValue, childValue, expectedChildValue]
     ["shape-margin", "0", "0", "0px"],
     ["shape-margin", "0", "1px", "1px"],
     ["shape-margin", "1px", "-1em", "0px"],
     ["shape-margin", "2px", "1px", "1px"]]
);
</script>
</body>
</html>
